﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using LPY.LeHealth.Service;
using LPY.LeHealth.DAL;
using LPY.LeHealth.DTO;

namespace LPY.LeHealth.WebSite.Controllers
{
    public class ClassifyTypeController : Controller
    {
    
        //实例化对象
        private ClassifyTypeService classifyTypeService;
        public ClassifyTypeController()
        {
            classifyTypeService = new ClassifyTypeService();
        }

        // GET: ClassifyType
        public ActionResult Index()
        {
            return View();
        }

        /// <summary>
        /// 获取体检类别范围表信息
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        public JsonResult GetClassTyep()
        {
           List<ClassifyType> list=classifyTypeService.GetClassifytype();
            return Json(list,JsonRequestBehavior.AllowGet);
        }

        /// <summary>
        /// 获取体检项类别信息
        /// </summary>
        /// <param name="Tid"></param>
        /// <returns></returns>
        [HttpGet]
        public JsonResult GetClass(int Tid)
        {
            List<Classify> list = classifyTypeService.GetClassify(Tid);
            return Json(list,JsonRequestBehavior.AllowGet);
        }
   
    }
}